<template>
	<view class="main">
		<view class="allImg">
			<view class="mask" v-show="maskShow"></view><!-- 遮罩层。。 -->
			<view class="texts">
				<image src="@/static/index-text.png" mode="scaleToFill"></image>
			</view>
			<view class="img">
				<image src="@/static/index-top.png" mode="scaleToFill"></image>
			</view>
		</view>

		<view class="top">
			<view class="end-title">
				<view v-for="(item,index) in items" :key="index" :class="[count == index?'btna':'every']" @tap="change(index)">
					{{item}}
					<view class="line">

					</view>
				</view>
			</view>

		</view>
		<view class="Popup" v-if="isShow">
			<view class="s-top">
				系统提醒
			</view>
			<view class="s-main">
				<text>
					该报警信息已处理
				</text>
			</view>
			<view class="s-botton">
				<button type="default" @click="sures" style="background-color: rgb(0, 89, 183);">确认</button>
			</view>
		</view>
		<view class="end-cont" v-show="show==0">

			　　<view class="item">
				<view class="item-top">
					<text class="left">报警名称（局部通风机）</text>
					<text class="right">未处理</text>
				</view>
				<view class="text">
					<view class="police">
						<text class="tleft">报警类型：</text>
						<text class="tright">类型名称</text>
					</view>
					<view class="police">
						<text class="tleft">报警等级：</text>
						<text class="tright">二等级</text>
					</view>
					<view class="police">
						<text class="tleft">报警数据：</text>
						<text class="tright">3.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警阈值：</text>
						<text class="tright">50.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警时间：</text>
						<text class="tright">2020-02-02 10：00</text>
					</view>
				</view>
				<view class="button">
					<button type="default" @click="handle">处理</button>
				</view>
			</view>
			<view class="item">
				<view class="item-top">
					<text class="left">报警名称（局部通风机）</text>
					<text class="right">未处理</text>
				</view>
				<view class="text">
					<view class="police">
						<text class="tleft">报警类型：</text>
						<text class="tright">类型名称</text>
					</view>
					<view class="police">
						<text class="tleft">报警等级：</text>
						<text class="tright">二等级</text>
					</view>
					<view class="police">
						<text class="tleft">报警数据：</text>
						<text class="tright">3.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警阈值：</text>
						<text class="tright">50.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警时间：</text>
						<text class="tright">2020-02-02 10：00</text>
					</view>
				</view>
				<view class="button">
					<button type="default">处理</button>
				</view>
			</view>
			
			　　<view class="item">
				<view class="item-top">
					<text class="left">报警名称（局部通风机）</text>
					<text class="right">未处理</text>
				</view>
				<view class="text">
					<view class="police">
						<text class="tleft">报警类型：</text>
						<text class="tright">类型名称</text>
					</view>
					<view class="police">
						<text class="tleft">报警等级：</text>
						<text class="tright">二等级</text>
					</view>
					<view class="police">
						<text class="tleft">报警数据：</text>
						<text class="tright">3.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警阈值：</text>
						<text class="tright">50.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警时间：</text>
						<text class="tright">2020-02-02 10：00</text>
					</view>
				</view>
				<view class="button">
					<button type="default" @click="handle">处理</button>
				</view>
			</view>
		</view>
		<view class="end-cont" v-show="show==1">
			　
			　　<view class="item">
				<view class="item-top">
					<text class="left">报警名称（局部通风机）</text>
					<text class="right">未处理</text>
				</view>
				<view class="text">
					<view class="police">
						<text class="tleft">报警类型：</text>
						<text class="tright">类型名称</text>
					</view>
					<view class="police">
						<text class="tleft">报警等级：</text>
						<text class="tright">二等级</text>
					</view>
					<view class="police">
						<text class="tleft">报警数据：</text>
						<text class="tright">3.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警阈值：</text>
						<text class="tright">50.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警时间：</text>
						<text class="tright">2020-02-02 10：00</text>
					</view>
				</view>
				<view class="button">
					<button type="default" @click="handle">处理</button>
				</view>
			</view>
		</view>
		<view class="end-cont" v-show="show==2">
			　　
			　　<view class="item">
				<view class="item-top">
					<text class="left">报警名称（局部通风机）</text>
					<text class="right">未处理</text>
				</view>
				<view class="text">
					<view class="police">
						<text class="tleft">报警类型：</text>
						<text class="tright">类型名称</text>
					</view>
					<view class="police">
						<text class="tleft">报警等级：</text>
						<text class="tright">二等级</text>
					</view>
					<view class="police">
						<text class="tleft">报警数据：</text>
						<text class="tright">3.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警阈值：</text>
						<text class="tright">50.0</text>
					</view>
					<view class="police">
						<text class="tleft">报警时间：</text>
						<text class="tright">2020-02-02 10：00</text>
					</view>
				</view>
				<view class="button">
					<button type="default" @click="handle">处理</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				maskShow: false,
				isShow: false,
				btnnum: 0,
				items: ["全部信息", "待处理", "已处理"],
				count: 0,
				show: 0
			}
		},
		methods: {
			change(e) {
				this.show = e
				this.count = e
				this.btnnum = e
				console.log(this.count)

			},
			handle() {
				this.isShow = true
				this.maskShow = true
			},
			sures() {
				this.isShow = false
				this.maskShow = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		width: 100%;
		height: 100%;
		background-color: rgb(247, 247, 247);
		overflow: hidden
		::-webkit-scrollbar {
			display: none;
		}
	}
	.main {
		width: 100%;
		height: 100%;
		position: relative;
		overflow-x: hidden;
		overflow-y: scroll;

		.mask {
			z-index: 999;
			position: fixed;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			z-index: 9;
			background: rgba(0, 0, 0, 0.3);
			-webkit-pointer-events: none;
			-moz-pointer-events: none;
			-ms-pointer-events: none;
			-o-pointer-events: none;
			pointer-events: none;
		}

		.Popup {
			position: absolute;
			left: 100rpx;
			top: 30%;
			width: 570rpx;
			height: 412rpx;
			background-color: white;
			z-index: 99;

			.s-top {
				width: 100%;
				height: 90rpx;
				background-color: rgb(243, 247, 251);
				text-align: center;
				line-height: 90rpx;
				font-size: 32rpx;
				color: rgb(24, 104, 190);
				font-weight: 900;
			}

			.s-main {
				width: 318rpx;
				height: 45rpx;
				margin-left: 28%;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 900;
				color: rgba(51, 51, 51, 1);
				opacity: 1;
				margin-top: 86rpx;
			}
			.s-botton {
				width: 506rpx;
				height: 72rpx;
				margin: 60rpx auto;
				button {
					color: white;
				}
			}
		}
	}
	.img {
		width: 100%;
		image {
			width: 110%;
			height: 276rpx;
			margin-left: -5rpx;
			overflow: hidden;
		}
	}
	.texts {
		position: absolute;
		top: 66rpx;
		left: 236rpx;
		z-index: 1;
		image {
			width: 297rpx;
			height: 32rpx;
		}
	}
	.top {
		width: 90%;
		height: 100rpx;
		position: relative;
		background-color: white;
		margin-top: -110rpx;
		margin-left: 38rpx;
		border-radius: 16rpx;
		.end-title {
			display: flex;
			flex-direction: row;
			justify-content: space-around;
			margin-left: 15%;

			.every {
				line-height: 100rpx;
				width: 128rpx;
				height: 45rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 600;
				color: rgb(158, 158, 158);
				opacity: 1;
			}
		}
	}

	.btna {
		// background-color:pink ;
		line-height: 100rpx;
		width: 128rpx;
		height: 45rpx;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 600;
		color: rgba(0, 89, 183, 1);
		opacity: 1;

		.line {
			width: 30rpx;
			height: 4rpx;
			background: rgba(0, 89, 183, 1);
			opacity: 1;
			margin-top: -20rpx;
			margin-left: 30%;
		}
	}

	.end-cont {
		width: 100%;
		// height: 100%;
		// background-color: pink;
          
		.item {
			width: 90%;
			height: 514rpx;
			background-color: white;
			margin: 0 auto;
			margin-bottom: 20rpx;
			position: relative;

			.item-top {
				width: 100%;
				height: 90rpx;
				background-color: rgb(243, 247, 251);
				position: relative;

				.left {
					width: 352rpx;
					height: 45rpx;
					font-size: 32rpx;
					font-family: PingFang SC;
					font-weight: 900;
					color: rgba(51, 51, 51, 1);
					opacity: 1;
					line-height: 90rpx;
					position: absolute;
					left: 20px;

				}

				.right {
					width: 84rpx;
					height: 40rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 900;
					// font-weight: bold;
					line-height: 90rpx;
					color: rgba(219, 48, 17, 1);
					opacity: 1;
					position: absolute;
					right: 30rpx;
				}
			}

			.text {
				width: 100%;
				height: 60%;
				// background-color: blue;
				border-bottom: 1px dashed rgb(153, 153, 153);

				.police {
					width: 100%;
					height: 20%;

					// background-color: red;
					.tleft {
						width: 252rpx;
						height: 40rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 46rpx;
						color: rgb(153, 153, 153);
						opacity: 1;
						margin-left: 10rpx;
					}

					.tright {
						width: 252rpx;
						height: 40rpx;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						line-height: 46rpx;
						color: rgb(51, 51, 51);
						opacity: 1;
					}
				}
			}

			.button {
				button {
					width: 130rpx;
					height: 48rpx;
					background-color: rgb(0, 89, 183);
					line-height: 48rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: rgba(255, 255, 255, 1);
					opacity: 1;
					position: absolute;
					right: 40rpx;
					bottom: 32rpx;
				}
			}
		}
	}
</style>
